<?php
const host = "localhost";
const user = "root";
const password = "root";
const dbname = "hoteldb";
const port = "3306";
const charset = "utf8";


// 连接数据库
$link=mysqli_connect(host,user,password,dbname,port);
// 设置编码
mysqli_set_charset($link,charset)

?>